/**
 * 
 */
package sk.stuba.fiit.foo07.genex.dao;

import java.sql.SQLException;
import java.util.ArrayList;

import sk.stuba.fiit.foo07.genex.beans.Keyword;

/**
 * @author _mizu_
 * 
 */
public interface KeywordDao {

    /**
     * Method for getting a keyword.
     * 
     * @param keywordID
     *                id of keyword
     * 
     * @return keyword
     * 
     */

    public Keyword getKeywordByID(Integer keywordID) throws SQLException;

    /**
     * Method for getting keywords from question.
     * 
     * @param questionID
     *                id of question
     * 
     * @return list of keywords
     * 
     */

    public ArrayList<Keyword> getKeywordsByQuestionID(Integer questionID)
            throws SQLException;

    /**
     * Method for adding a keyword.
     * 
     * @param questionID
     *                id of question where to add
     * @param toAdd
     *                keyword to add
     * 
     * 
     */
    public void addKeyword(Integer questionID, Keyword toAdd)
            throws SQLException;

    /**
     * Method for adding keywords.
     * 
     * @param questionID
     *                id of question where to add
     * @param toAdd
     *                keywords to add
     * 
     * 
     */
    public void addKeywords(Integer questionID, ArrayList<Keyword> toAdd)
            throws SQLException;

    /**
     * Method for updating keywords.
     * 
     * @param toUpdate
     *                keyword for update
     * 
     * 
     */
    public void updateKeyword(Keyword toUpdate) throws SQLException;

    /**
     * Method for deleting keywords.
     * 
     * @param toDelete
     *                keyword for delete
     * 
     * 
     */
    public void deleteKeyword(Keyword toDelete) throws SQLException;

    /**
     * Method for deleting all keywords from question.
     * 
     * @param questionID
     *                id of question
     * 
     * 
     */
    public void deleteAllKeywordsFromQuestion(Integer questionID)
            throws SQLException;

    /**
     * Method for deleting keywords from from database.
     * 
     * @param toDelete
     *                listof keywords for delete
     * 
     * 
     */

    public void deleteKeywords(ArrayList<Keyword> toDelete) throws SQLException;

    /**
     * Method for getting all answers.
     * 
     * 
     * @return list of all keywords
     * 
     */

    public ArrayList<Keyword> getAllKeywords() throws SQLException;
}
